package com.whatever;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class FinishScreen extends Activity implements OnClickListener {
	
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.finish);
		
		TextView screenTitle = (TextView)findViewById(R.id.textView0);
		TextView compliment = (TextView)findViewById(R.id.textView1);
		TextView score0 = (TextView)findViewById(R.id.scores);
		Button button = (Button)findViewById(R.id.button0);
		
		if(/*NewGameActivity.madeHighScores*/ true) {
			screenTitle.setText("Congratulations!");
			compliment.setText("You've made the high-scores list!");
		} else {
			screenTitle.setText("You lost!");
			compliment.setText("Your final score was: " + NewGameActivity.newScore);
		}
		
		score0.setText(NewGameActivity.highScoreNames[0] + ": " + NewGameActivity.scores[0] + 
				"\n" + NewGameActivity.highScoreNames[1] + ": " + NewGameActivity.scores[1] + 
				"\n" + NewGameActivity.highScoreNames[2] + ": " + NewGameActivity.scores[2] + 
				"\n" + NewGameActivity.highScoreNames[3] + ": " + NewGameActivity.scores[3] + 
				"\n" + NewGameActivity.highScoreNames[4] + ": " + NewGameActivity.scores[4]);
		
		button.setText("Play Again!");
		button.setOnClickListener(this);
	}

	public void onClick(View arg0) {
		Intent game = new Intent(this, NewGameActivity.class);
		this.startActivity(game);
	}
}
